<template>
    <u-button class="u-p-l-40 u-p-r-30 u-flex u-row-between member" @tap="memberDetail(listItem.id)">
        <view class="u-flex u-font-28" style="max-width:94%">
            <text class="u-m-r-66 u-text-left u-line-1" style="min-width:84rpx; max-width:25%" @longtap="longTap(listItem.xm)">
                {{listItem.xm}}
            </text>
            <text class="uni-higt-color u-m-r-40">{{listItem.zjhm}}</text>
            <u-icon name="checkmark-circle" :color="listItem.sfyx==1?'#f0ad4e':'#bbb'" size="17"></u-icon>
        </view>
        <u-icon name="arrow-right" color="#21A5F3" size="17"></u-icon>
    </u-button>
</template>

<script>
import tools from '@/tools/tools.js'
export default {
    name: 'teamMember',
    props:{
        listItem: {
            type: Object,
            default () {
                return {}
            }
        }
    },

    created() {
        this.listItem.zjhm = tools.formatIdentity(this.listItem.zjhm)
    },

    methods: {
        // 姓名溢出隐藏后的长按提示
        longTap(value){
            this.$refs.uToast.show({ message: value, type: 'default', duration: 3000 })
        },
        // 班组成员详情
        memberDetail(id){
            uni.navigateTo({ url: '/pages/member-bag/detail?id='+id })
        },
    },

}
</script>

<style scoped lang="scss">
    .member{
        height: 80rpx;
        background: #F6F7F8;
        border: none;
        justify-content: space-between !important;
    }
</style>